<template>
  <div class="show" @click="click">
    关注
  </div>
</template>
<script>
import { Dialog } from 'vant'
export default {
  data() {
    return {
      show: false,
    }
  },
  components: {
    [Dialog.Component.name]: Dialog.Component,
  },
  methods: {
    click() {
      this.show = true
      if (this.show) {
        Dialog.confirm({
          message: '请登录后收藏该商品',
        })
          .then(() => {
            // on confirm
          })
          .catch(() => {
            // on cancel
          })
      }
    },
  },
}
</script>
<style lang="less" scoped>
.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
  .sod {
    text-align: center;
  }
  p {
    margin: 0;
  }
}
</style>
